{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>定时检测</h5>
        </div>
        <div class="ibox-content">
            <div class="hr-line-dashed"></div>

            <div class="example-wrap">
                <div class="example">
                    <span id='resultText'></span>
                </div>
            </div>
            <!-- End Example Pagination -->
        </div>
    </div>
</div>
<!-- End Panel Other -->
</div>

<!-- 加载动画 -->
<div class="spiner-example">
    <div class="sk-spinner sk-spinner-three-bounce">
        <div class="sk-bounce1"></div>
        <div class="sk-bounce2"></div>
        <div class="sk-bounce3"></div>
    </div>
</div>

{include file="public/footer" /}
<style>
.jc{ color:#666;border-radius:5px; border:solid 1px #666;padding:2px;font-size:12px;cursor:pointer; }
.jc66{ color:#00CC33;border:solid 1px #00CC33;}
.jc0{ color:#ff0000;border:solid 1px #ff0000;}
.jc88{ color:#ff0000;border:solid 1px #ff0000;}
</style>
<script type="text/javascript">
var num = "{$num}";
 var content = '';
	function check(){
	    num --;
	    if(num<0){
	        $("#resultText").html(content);
	        return false;
	    }
		$("#resultText").html("正在检查");
		$.ajax({
			type:"post",
			data:{"num_luodi":num},
			dataType:"json",
			success:function(res){
			       content += '最后检测时间:' + (new Date()).toLocaleTimeString() + "  检测结果:" + res.msg+"<br />";
			//	$("#resultText").html('最后检测时间:' + (new Date()).toLocaleTimeString() + "  检测结果:" + res.msg);
				setTimeout(function () {check() }, 2000); 
			}
		});
	}
    setTimeout(function () {check() }, 2000); 
</script>
</body>
</html>